<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileOverview 뷰어 > 지면뷰어의 모델
<span class='line'>  3</span>  * @author dioong
<span class='line'>  4</span>  */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.viewer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="NAME">nhn.newsstand.viewer.paper</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer.paper</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="NAME">nhn.newsstand.viewer.paper.Model</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Class</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends nhn.newsstand.viewer.paper.Model.prototype */</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="NAME">_htDocumentSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">	</span><span class="NAME">_htArticleInfo</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">		</span><span class="COMM">/*article정보*/</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">	</span><span class="NAME">_htViewerSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">	</span><span class="NAME">_sSelectedArticleId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 16</span> 	 * nhn.newsstand.viewer.paper.Model 클래스의 인스턴스를 생성한다.
<span class='line'> 17</span> 	 * @constructs 
<span class='line'> 18</span> 	 * @class 뷰어 > 지면뷰어의 모델
<span class='line'> 19</span> 	 * @requires nhn.newsstand.viewer.config
<span class='line'> 20</span> 	 * @requires nhn.newsstand.viewer.paper.Model.MSG
<span class='line'> 21</span> 	 * @requires nhn.newsstand.common.util
<span class='line'> 22</span> 	 * @example
<span class='line'> 23</span> 	 * var oModel = new nhn.newsstand.viewer.paper.Model();
<span class='line'> 24</span> 	 */</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">	</span><span class="NAME">$init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 28</span> 	 * 신문 크기 정보를 멤버 변수에 저장하는 함수
<span class='line'> 29</span> 	 * @param {Hashtable} htPaperSize 	한페이지 기준 신문 크기
<span class='line'> 30</span> 	 * @param {Number} nViewType 	한/양면보기  한면보기=1, 양면보기 2
<span class='line'> 31</span> 	 */</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">	</span><span class="NAME">setPaperSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htPaperSize</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">		</span><span class="NAME">this._htPaperSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htPaperSize</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">		</span><span class="NAME">this.setTotalPageWidth</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize.width</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 38</span> 	 * 신문크기 정보를 반환
<span class='line'> 39</span> 	 * @return {HashTable} 신문 사이즈값(width, height)
<span class='line'> 40</span> 	 */</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">	</span><span class="NAME">getPaperSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 44</span> 
<span class='line'> 45</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 46</span> 	 * 전체 신문 너비 값을 멤버 변수에 저장
<span class='line'> 47</span> 	 * @param {Number} nWidth 전체 신문 너비
<span class='line'> 48</span> 	 */</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">	</span><span class="NAME">setTotalPageWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">		</span><span class="NAME">this._nTotalPageWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 54</span> 	 * 전체 신문 너비 값를 반환
<span class='line'> 55</span> 	 * @return {Number} 신문 전체 가로 사이즈
<span class='line'> 56</span> 	 */</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">	</span><span class="NAME">getTotalPageWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._nTotalPageWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 62</span> 	 * 신문 크기에 대한 기본 정보. 신문 크기는 300DPI 기준이다.
<span class='line'> 63</span> 	 * @param {Number} nWidth 	너비 값
<span class='line'> 64</span> 	 * @param {Number} height 	높이 값
<span class='line'> 65</span> 	 */</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">	</span><span class="NAME">setBasePaperInfo</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="NAME">height</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">		</span><span class="NAME">this._htbasePaperInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">			</span><span class="STRN">'height'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">height</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">			</span><span class="STRN">'DPI'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">300</span><span class="WHIT">				</span><span class="COMM">//  기본 DPI는 300</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 75</span> 	 * 신문 크기에 대한 기본 정보를 반환
<span class='line'> 76</span> 	 * @return {HashTable} 신문 크기관련 기본 정보(width, height, DPI)
<span class='line'> 77</span> 	 */</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="NAME">getBasePaperInfo</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._htbasePaperInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 81</span> 
<span class='line'> 82</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 83</span> 	 * 선택된 기사 아이디 값을 저장하는 함수
<span class='line'> 84</span> 	 * @param {String} sArticleId 		기사 아이디 
<span class='line'> 85</span> 	 */</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">	</span><span class="NAME">setSelectedArticleId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">		</span><span class="NAME">this._sSelectedArticleId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sArticleId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 91</span> 	 * 선택된 기사 아이디 값을 리턴하는 함수
<span class='line'> 92</span> 	 * @return {String} 기사 아이디
<span class='line'> 93</span> 	 */</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">	</span><span class="NAME">getSelectedArticleId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._sSelectedArticleId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 99</span> 	 * 뷰어 영역 계산하는 함수, 신문사이즈와 브라우저상의 뷰어 크기를 비교해서 더 작은 값을 리턴한다
<span class='line'>100</span> 	 * @param {HashTable} htContentSize 마크업 상에서의 Content 영역 크기
<span class='line'>101</span> 	 * @return {HashTable} 뷰어 영역의 사이즈값(width, height)
<span class='line'>102</span> 	 */</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">	</span><span class="NAME">calcViewerSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htContentSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htPaperSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPaperSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">			</span><span class="STRN">"width"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">htContentSize.width</span><span class="PUNC">,</span><span class="NAME">this.getTotalPageWidth</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">			</span><span class="STRN">"height"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">htContentSize.height</span><span class="PUNC">,</span><span class="NAME">htPaperSize.height</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>113</span> 	 * 원본 사이즈비 대비 DPI로 신문 사이즈 계산 
<span class='line'>114</span> 	 * @param {Number} nPercent 	DPI값
<span class='line'>115</span> 	 * @return {HashTable} DPI에 따른 신문 사이즈(width, height)
<span class='line'>116</span> 	 */</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	</span><span class="NAME">calcPaperSize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPercent</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">this._htbasePaperInfo.width</span><span class="PUNC">*</span><span class="NAME">nPercent</span><span class="PUNC">/</span><span class="NAME">this._htbasePaperInfo.DPI</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">			</span><span class="STRN">'height'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">this._htbasePaperInfo.height</span><span class="PUNC">*</span><span class="NAME">nPercent</span><span class="PUNC">/</span><span class="NAME">this._htbasePaperInfo.DPI</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>125</span> 	 * 뷰어 확대/축소시 이전 크기대비 현재 DPI에서의 위치 값을 구한다. 
<span class='line'>126</span> 	 * @param {Number} nPrePos 이전 위치 값	
<span class='line'>127</span> 	 * @param {Number} nPrePaperSize 	이전 신문 크기
<span class='line'>128</span> 	 * @param {Number} nPaperSize 	변경된 신문 크기
<span class='line'>129</span> 	 * @param {Number} nViewerSize 	신문이 노출될 수 있는 크기
<span class='line'>130</span> 	 * @return {Number} 이전 크기대비 현재 DPI에서의 위치 값
<span class='line'>131</span> 	 */</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">	</span><span class="NAME">calMovePos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPrePos</span><span class="PUNC">,</span><span class="NAME">nPrePaperSize</span><span class="PUNC">,</span><span class="NAME">nPaperSize</span><span class="PUNC">,</span><span class="NAME">nViewerSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nPos</span><span class="WHIT">  </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">nPrePos</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">nViewerSize</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPaperSize</span><span class="PUNC">/</span><span class="NAME">nPrePaperSize</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nViewerSize</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">		</span><span class="COMM">//예외 처리</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewerSize</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">nPaperSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="COMM">//뷰어 사이즈가 페이지 사이즈보다 클 때,</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">			</span><span class="NAME">nPos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nPos</span><span class="PUNC">+</span><span class="NAME">nViewerSize</span><span class="PUNC">></span><span class="NAME">nPaperSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">				</span><span class="COMM">//이동될 위치값+뷰어 사이즈 값이 페이지 사이즈보다 클 때 (짤리는 영역 나옴)</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">			</span><span class="NAME">nPos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPaperSize</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nViewerSize</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">nPos</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>145</span> 	 * 폭맞춤 DPI배율을 계산
<span class='line'>146</span> 	 * @param {Number} nViewType 	한/양면보기  한면보기=1, 양면보기 2 
<span class='line'>147</span> 	 * @param {Number} nContentWidth 신문이 노출될 수 있는 영역의 너비
<span class='line'>148</span> 	 * @return {Number} 폭맞춤 배율
<span class='line'>149</span> 	 */</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">	</span><span class="NAME">calcProperDpiOnWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">nContentWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htbasePaperInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getBasePaperInfo</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._calcProperDPI</span><span class="PUNC">(</span><span class="NAME">nContentWidth</span><span class="PUNC">,</span><span class="NAME">htbasePaperInfo.width</span><span class="PUNC">*</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>156</span> 	 * 쪽맞춤 DPI배율을 계산 , 가로 세로 너비에 따른 값을 계산해서 더 작은 값을 리턴한다.
<span class='line'>157</span> 	 * @param {Number} nViewType 	한/양면보기  한면보기=1, 양면보기 2 
<span class='line'>158</span> 	 * @param {Number} nContentWidth 신문이 노출될 수 있는 영역의 너비
<span class='line'>159</span> 	 * @return {Number} 쪽맞춤 배율
<span class='line'>160</span> 	 */</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">	</span><span class="NAME">calcProperDpiOnPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">htContentSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htbasePaperInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getBasePaperInfo</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">this._calcProperDPI</span><span class="PUNC">(</span><span class="NAME">htContentSize.height</span><span class="PUNC">,</span><span class="NAME">htbasePaperInfo.height</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">this.calcProperDpiOnWidth</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">htContentSize.width</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>167</span> 	 * 쪽/폭맞춤 공통 core 로직
<span class='line'>168</span> 	 * @param {Number} nViewerSize 	뷰어 영역 크기
<span class='line'>169</span> 	 * @param {Number} nBaseSize 	신문 기본 크기
<span class='line'>170</span> 	 * @return {Number}
<span class='line'>171</span> 	 */</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">	</span><span class="NAME">_calcProperDPI</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewerSize</span><span class="PUNC">,</span><span class="NAME">nBaseSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nBaseDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htbasePaperInfo.DPI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTempDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nViewerSize</span><span class="PUNC">*</span><span class="NAME">nBaseDPI</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="PUNC">(</span><span class="NAME">nBaseSize</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htZoomInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oConfig.ZOOM_INFO</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htZoomInfo.basic.concat</span><span class="PUNC">(</span><span class="NAME">htZoomInfo.hidden</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">		</span><span class="NAME">aDPI.sort</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">			 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">></span><span class="NAME">b</span><span class="PUNC">?</span><span class="NUMB">1</span><span class="PUNC">:</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aDPI.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nTempDPI</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aDPI</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">				</span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">				</span><span class="NAME">nDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aDPI</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">				</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>188</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>193</span> 	 * 뷰어 영역 브라우저 상 가운데 위치 계산
<span class='line'>194</span> 	 * @param {Number} nViewType 	한/양면보기  한면보기=1, 양면보기 2
<span class='line'>195</span> 	 * @param {Number} htContentSize 신문이 노출될 수 있는 영역의 크기
<span class='line'>196</span> 	 * @return {HashTable} 위치값(top, left)
<span class='line'>197</span> 	 */</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">	</span><span class="NAME">calViewerCenterPos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">htContentSize</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nPaperWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._nTotalPageWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nPaperHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPaperSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">height</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htContentSize.width</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">nPaperWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">			</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htContentSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nPaperWidth</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT">			</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htContentSize.height</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">nPaperHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htContentSize.height</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nPaperHeight</span><span class="PUNC">)</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">			</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">			</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"px"</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>222</span> 	 * 현재 DPI에 대응하는 기사의 상,하,좌,우의 좌표 값을 알아낸다.
<span class='line'>223</span> 	 * @param {Array} aCoord  기사 테두리 좌표 배열(300DPI기준)
<span class='line'>224</span> 	 * @param {String} sSide 왼쪽면, 오른쪽 면
<span class='line'>225</span> 	 * @return {HashTable} 기사의 꼭지점 좌표값(top, left, right, bottom)
<span class='line'>226</span> 	 */</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">	</span><span class="NAME">calcContextMenuCoordi</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aCoord</span><span class="PUNC">,</span><span class="NAME">sSide</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>229</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nRight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nBottom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nExtraX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sSide</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="STRN">"left"</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.getPaperSize</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">width</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//오른쪽 면일 경우 한 면의 너비를 더한다.</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aTmp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aCoord.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">			</span><span class="NAME">aTmp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aCoord</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">			</span><span class="NAME">nX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oUtil.roundXL</span><span class="PUNC">(</span><span class="NAME">aTmp</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NAME">this._htbasePaperInfo.DPI</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="NAME">nExtraX</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//DPI에 따른 X 좌표</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">			</span><span class="NAME">nY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oUtil.roundXL</span><span class="PUNC">(</span><span class="NAME">aTmp</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NAME">this._htbasePaperInfo.DPI</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="COMM">//DPI에 따른 Y 좌표</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">			</span><span class="NAME">nRight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">nRight</span><span class="PUNC">,</span><span class="NAME">nX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//기사 최우측 좌표 값</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">			</span><span class="NAME">nBottom</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">nBottom</span><span class="PUNC">,</span><span class="NAME">nY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//기사 최하단 좌표 값</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">				</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">				</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">nLeft</span><span class="PUNC">,</span><span class="NAME">nX</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">				</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nY</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">				</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="NAME">nTop</span><span class="PUNC">,</span><span class="NAME">nY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">			</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">			</span><span class="STRN">'bottom'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nBottom</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">			</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nLeft</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">			</span><span class="STRN">'right'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nRight</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>269</span> 	 * 서버로부터 넘겨 받는 신문데이터 배열에서 각 페이지에 해당하는 정보가 있는 배열 idx를 리턴한다. 
<span class='line'>270</span> 	 * @param {Number} nViewType 	한/양면보기 여부
<span class='line'>271</span> 	 * @param {Number} nCurPage 	얻고자 하는 index의 페이지 번호
<span class='line'>272</span> 	 * @return {Number} 배열의 인덱스
<span class='line'>273</span> 	 */</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">	</span><span class="NAME">calcCurPageIdx</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">nCurPage</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">		</span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">  </span><span class="NUMB">3</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>284</span> 	 * 현재 페이지 번호 계산
<span class='line'>285</span> 	 * @param {Number} nCurPage 		현재 페이지 번호
<span class='line'>286</span> 	 * @param {Number} nViewPageCnt 	한/양면보기 지정
<span class='line'>287</span> 	 * @return {Number} 현재 페이지 번호
<span class='line'>288</span> 	 */</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">	</span><span class="NAME">calcCurrentPageNum</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nCurPage</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">			</span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nCurPage</span><span class="PUNC">%</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nCurPage</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="COMM">//시작 페이지 번호</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT">			</span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">nCurPage</span><span class="PUNC">,</span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nCurPage</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>298</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>299</span> 	 * 이전 페이지 번호를 계산
<span class='line'>300</span> 	 * @param {Number} nPageNum 		현재 페이지 번호
<span class='line'>301</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>302</span> 	 * @return {Number} 이전 페이지 번호
<span class='line'>303</span> 	 */</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT">	</span><span class="NAME">calcPrePageNum</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">			</span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT">			</span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nAdd</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>314</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>316</span> 	 * 다음 페이지 번호를 계산
<span class='line'>317</span> 	 * @param {Number} nPageNum 		현재 페이지 번호
<span class='line'>318</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>319</span> 	 * @return {Number} 다음 페이지 번호
<span class='line'>320</span> 	 */</span><span class="WHIT">
<span class='line'>321</span> </span><span class="WHIT">	</span><span class="NAME">calcNextPageNum</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>322</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>323</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>324</span> </span><span class="WHIT">			</span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="WHIT">
<span class='line'>325</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>326</span> </span><span class="WHIT">			</span><span class="NAME">nAdd</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">  </span><span class="NAME">nViewType</span><span class="PUNC">*</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//cast to number;</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">nAdd</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>329</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>330</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>332</span> 	 * 페이지 넘기기 애니메이션에서 사용되는 이미지 시작 페이지 번호를 계산하여 리턴한다
<span class='line'>333</span> 	 * @param {Number} nCurPage 		현재 페이지 번호
<span class='line'>334</span> 	 * @param {Number} nViewPageCnt 	한/양면보기 지정
<span class='line'>335</span> 	 * @return {Number} 페이지 넘기기용 이미지 중 시작 이미지의 번호
<span class='line'>336</span> 	 */</span><span class="WHIT">
<span class='line'>337</span> </span><span class="WHIT">	</span><span class="NAME">calcPageFlipStartPageNum</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>338</span> </span><span class="WHIT">		</span><span class="COMM">/*페이지 넘기기 애니메이션 시작 페이지 번호 정의*/</span><span class="WHIT">
<span class='line'>339</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nStartPageNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>340</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>341</span> </span><span class="WHIT">			</span><span class="NAME">nStartPageNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>342</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">			</span><span class="NAME">nStartPageNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nStartPageNum</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>348</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>349</span> 	 * 기사 테두리 정보를 좌/우 페이지로 나눠서 HashTable형태로 반환
<span class='line'>350</span> 	 * @return {HashTable} 좌,우 기사의 테두리 정보(left, right)
<span class='line'>351</span> 	 */</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT">	</span><span class="NAME">makeArticleOutLineInfo</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>353</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htArticleOutLinInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>354</span> </span><span class="WHIT">			</span><span class="STRN">"left"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>355</span> </span><span class="WHIT">			</span><span class="STRN">"right"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>356</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>357</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htLArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sLKey</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">htLArticleInfo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>360</span> </span><span class="WHIT">			</span><span class="NAME">htArticleOutLinInfo</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">htLArticleInfo</span><span class="PUNC">[</span><span class="NAME">sLKey</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>361</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>362</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>363</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htRArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>364</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sRKey</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">htRArticleInfo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>365</span> </span><span class="WHIT">			</span><span class="NAME">htArticleOutLinInfo</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">htRArticleInfo</span><span class="PUNC">[</span><span class="NAME">sRKey</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>366</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>367</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">htArticleOutLinInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>368</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>371</span> 	 * 컨텍스트 메뉴의 위치를 계산한다.
<span class='line'>372</span> 	 * @param {HashTable} htConMenuCoordi 	컨텍스트 메뉴 대상 기사 좌표
<span class='line'>373</span> 	 * @param {HashTable} htContentSize 	신문이 노출되는 영역 크기
<span class='line'>374</span> 	 * @param {HashTable} htLayerSize 		컨텍스트 메뉴 크기
<span class='line'>375</span> 	 * @param {HashTable} htMovablePos 		신문의 left,top 값
<span class='line'>376</span> 	 * @param {HashTable} htViewerPos 		뷰어의 left, top값
<span class='line'>377</span> 	 * @param {HashTable} nViewerHeight 	뷰어의 높이 값
<span class='line'>378</span> 	 * @return {HashTable} 위치값(top, left)
<span class='line'>379</span> 	 */</span><span class="WHIT">
<span class='line'>380</span> </span><span class="WHIT">	</span><span class="NAME">calcContextMenuPos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htConMenuCoordi</span><span class="PUNC">,</span><span class="NAME">htContentSize</span><span class="PUNC">,</span><span class="NAME">htLayerSize</span><span class="PUNC">,</span><span class="NAME">htMovablePos</span><span class="PUNC">,</span><span class="NAME">htViewerPos</span><span class="PUNC">,</span><span class="NAME">nViewerHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">		</span><span class="COMM">/*
<span class='line'>382</span> 		element의 Left값은 기사의 left보다 작으면 안 되고, 기사의 right보다 크면 안 됨
<span class='line'>383</span> 		element의 top값은 기사의 top보다 작으면 안 되고, 기사의 bottom보다 크면 안 됨. 
<span class='line'>384</span> 		*/</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nMaxRight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htContentSize.width</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">htLayerSize.width</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//오른쪽 최대 값</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nMinRight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htMovablePos.left</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NAME">htContentSize.width</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>388</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>389</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nMinRight</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">htConMenuCoordi.left</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="COMM">//기사가 화면에 안 보이는 조건.</span><span class="WHIT">
<span class='line'>390</span> </span><span class="WHIT">			</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nMaxRight</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">htViewerPos.left</span><span class="PUNC">+</span><span class="NAME">htMovablePos.left</span><span class="PUNC">+</span><span class="NAME">htConMenuCoordi.right</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">	</span><span class="COMM">//기본적으로 context메뉴가 떠야하는 left 값			</span><span class="WHIT">
<span class='line'>392</span> </span><span class="WHIT">			</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htViewerPos.left</span><span class="PUNC">+</span><span class="NAME">htMovablePos.left</span><span class="PUNC">+</span><span class="NAME">htConMenuCoordi.right</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>393</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>394</span> </span><span class="WHIT">			</span><span class="NAME">nLeft</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nMaxRight</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>396</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>397</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="COMM">//Top 최소 값.</span><span class="WHIT">
<span class='line'>398</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nDefTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htViewerPos.top</span><span class="PUNC">+</span><span class="NAME">htMovablePos.top</span><span class="PUNC">+</span><span class="NAME">htConMenuCoordi.top</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//기본적으로 context메뉴가 떠야하는 top값(뷰어의 top 위치 값 + 신문top(상위에서 이동된 거리) + 기사 top)</span><span class="WHIT">
<span class='line'>399</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nVisibleHeight</span><span class="WHIT">  </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htLayerSize.height</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>400</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htConMenuCoordi.bottom</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htMovablePos.top</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htConMenuCoordi.top</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htMovablePos.top</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NAME">htContentSize.height</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="COMM">//기사가 화면에 안 보이는 조건.</span><span class="WHIT">
<span class='line'>401</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>402</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">nDefTop</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>403</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>404</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htMovablePos.top</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NAME">nViewerHeight</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">htConMenuCoordi.top</span><span class="PUNC">+</span><span class="NAME">nVisibleHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="COMM">//cotextMenu가 footer밑으로 숨어 버릴때.			</span><span class="WHIT">
<span class='line'>405</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nDefTop</span><span class="PUNC">-</span><span class="PUNC">(</span><span class="NAME">htConMenuCoordi.top</span><span class="PUNC">+</span><span class="NAME">nVisibleHeight</span><span class="PUNC">-</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">htMovablePos.top</span><span class="PUNC">*</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NAME">nViewerHeight</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//기본 값에 숨어버린 높이 값을 빼준다. </span><span class="WHIT">
<span class='line'>406</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>407</span> </span><span class="WHIT">			</span><span class="NAME">nTop</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nDefTop</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>408</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>409</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT">			</span><span class="STRN">'top'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nTop</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>411</span> </span><span class="WHIT">			</span><span class="STRN">'left'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">  </span><span class="NAME">nLeft</span><span class="WHIT">
<span class='line'>412</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>415</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>416</span> 	 * 기사 상태에 대해 적합한 컨텍스트 메뉴 문구와 URL를 만들어 리턴한다.
<span class='line'>417</span> 	 * @param {HashTable} htArticleInfo 	기사 정보(서버에서 던져주는 정보.
<span class='line'>418</span> 	 * @return {HashTable} 컨텍스트 메뉴 문구와 URL(MSG, URL)
<span class='line'>419</span> 	 */</span><span class="WHIT">
<span class='line'>420</span> </span><span class="WHIT">	</span><span class="NAME">makeArticleStatus</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htArticleInfo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>421</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htArticleInfo.committee</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>422</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htMSG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.viewer.paper.Model.MSG.CONTEXTMENU</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>423</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>424</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htArticleInfo.blindYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"BLIND_AREA"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>425</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>426</span> </span><span class="WHIT">				</span><span class="STRN">'MSG'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htMSG</span><span class="PUNC">[</span><span class="STRN">"BLINDAREA"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>427</span> </span><span class="WHIT">				</span><span class="STRN">'URL'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htArticleCommitteInfo</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>430</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>431</span> </span><span class="WHIT">				</span><span class="STRN">'MSG'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>432</span> </span><span class="WHIT">				</span><span class="STRN">'URL'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="WHIT">
<span class='line'>433</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>434</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>435</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sArticleStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>437</span> </span><span class="WHIT">			</span><span class="KEYW">switch</span><span class="PUNC">(</span><span class="NAME">htArticleCommitteInfo.articleStat</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="COMM">// 기사 상태</span><span class="WHIT">
<span class='line'>438</span> </span><span class="WHIT">				</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"REVIEW"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>439</span> </span><span class="WHIT">					</span><span class="NAME">sArticleStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htMSG.ARTICLESTATUS.REVIEW</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>440</span> </span><span class="WHIT">					</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>441</span> </span><span class="WHIT">				</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"REQUEST"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>442</span> </span><span class="WHIT">					</span><span class="NAME">sArticleStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Template</span><span class="PUNC">(</span><span class="NAME">htMSG.ARTICLESTATUS.REQUEST</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">process</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="STRN">'REPORTTP'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htMSG</span><span class="PUNC">[</span><span class="STRN">"REPORTTP"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">htArticleCommitteInfo.reportTp</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">					</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">				</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"JUDGMENT"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bIsOriginalArticle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo.originalFollowTp</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"ORIGINAL"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htArticleCommitteInfo.inputContent</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>447</span> </span><span class="WHIT">						</span><span class="NAME">sArticleStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Template</span><span class="PUNC">(</span><span class="NAME">htMSG.ARTICLESTATUS.INPUTCONTENT</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">process</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>448</span> </span><span class="WHIT">							</span><span class="STRN">'INPUTCONTENT'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo.inputContent</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>449</span> </span><span class="WHIT">							</span><span class="STRN">'URL'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo.articleUrl</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>450</span> </span><span class="WHIT">							</span><span class="STRN">'MSG_ARTICLE_VIEW'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">bIsOriginalArticle</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"기사보기"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"원문기사보기"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>451</span> </span><span class="WHIT">							</span><span class="STRN">'MSG_ENDING'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">bIsOriginalArticle</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"이 있습니다."</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">" 입니다."</span><span class="WHIT">
<span class='line'>452</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">						</span><span class="NAME">sArticleStatus</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Template</span><span class="PUNC">(</span><span class="NAME">htMSG.ARTICLESTATUS.JUDGMENT</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">process</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">							</span><span class="STRN">'REPORTTP'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htMSG</span><span class="PUNC">[</span><span class="STRN">"REPORTTP"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">htArticleCommitteInfo.reportTp</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT">							</span><span class="STRN">'URL'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo.articleUrl</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT">							</span><span class="STRN">'MSG_ARTICLE_VIEW'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">bIsOriginalArticle</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"기사보기"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"원문기사보기"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>458</span> </span><span class="WHIT">							</span><span class="STRN">'MSG_ENDING'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">bIsOriginalArticle</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"이 있습니다."</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">" 입니다."</span><span class="WHIT">
<span class='line'>459</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT">					</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>462</span> </span><span class="COMM">//				case "ACCEPT" : </span><span class="WHIT">
<span class='line'>463</span> </span><span class="COMM">//					break;</span><span class="WHIT">
<span class='line'>464</span> </span><span class="COMM">//				case "REJECT" : </span><span class="WHIT">
<span class='line'>465</span> </span><span class="COMM">//					break;</span><span class="WHIT">
<span class='line'>466</span> </span><span class="WHIT">				</span><span class="WHIT">
<span class='line'>467</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>468</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>469</span> </span><span class="WHIT">				</span><span class="STRN">'MSG'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sArticleStatus</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>470</span> </span><span class="WHIT">				</span><span class="STRN">'URL'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htArticleCommitteInfo.articleUrl</span><span class="WHIT">
<span class='line'>471</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>473</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>474</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>475</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>476</span> 	 * 기사 아이디에 해당하는 기사 정보를 가져온다.
<span class='line'>477</span> 	 * @param {String} sArticleId 	기사 아이디
<span class='line'>478</span> 	 * @return {HashTable} 해당 기사 정보
<span class='line'>479</span> 	 */</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">	</span><span class="NAME">getArticleInfoByArticleId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>481</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sArticleId</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>483</span> </span><span class="WHIT">			</span><span class="NAME">htArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sArticleId</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">			</span><span class="NAME">htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"side"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">			</span><span class="NAME">htArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sArticleId</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT">			</span><span class="NAME">htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"side"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"right"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>488</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>489</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">htArticleInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>490</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>491</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>492</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>493</span> 	 * 신문 페이지별 정보를 멤버 변수에 저장한다
<span class='line'>494</span> 	 * @param {Number} aPageInfo 		현재 페이지 번호
<span class='line'>495</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>496</span> 	 */</span><span class="WHIT">
<span class='line'>497</span> </span><span class="WHIT">	</span><span class="NAME">setArticleInfo</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPageInfo</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>498</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nDataStartIdx</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>499</span> </span><span class="WHIT">		</span><span class="NAME">this._htArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>500</span> </span><span class="WHIT">			</span><span class="STRN">"left"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>501</span> </span><span class="WHIT">			</span><span class="STRN">"right"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>503</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>504</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>505</span> </span><span class="WHIT">		</span><span class="NAME">aArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nDataStartIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articles</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nDataStartIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articles.article</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>506</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aArticleInfo.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">			</span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">aArticleInfo</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articleId</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aArticleInfo</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">		</span><span class="NAME">aArticleInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nDataStartIdx</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articles</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nDataStartIdx</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articles.article</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>511</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aArticleInfo.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>512</span> </span><span class="WHIT">			</span><span class="NAME">this._htArticleInfo</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">aArticleInfo</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articleId</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aArticleInfo</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>514</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>515</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>516</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>517</span> 	 * 페이지 넘기기 애니메이션에 필요한 통이미지 URL을 가져온다.
<span class='line'>518</span> 	 * @param {Number} nPageNum 		현재 페이지 번호
<span class='line'>519</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>520</span> 	 * @param {HashTable} htFlipInfo 	페이지 플립을 위해 필요한 정보
<span class='line'>521</span> 	 * @return {Array} 페이지 애니메이션에 필요한 통이미지 목록(항상 6개)
<span class='line'>522</span> 	 */</span><span class="WHIT">
<span class='line'>523</span> </span><span class="WHIT">	</span><span class="NAME">getImageForFlip</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">htFlipInfo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>524</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aImage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>525</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nPaperIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nFlipPageCnt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>527</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nFlipPageCnt</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>528</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">htFlipInfo.lastPageNum</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">	</span><span class="COMM">//페이지 번호가 0일 때에 대한 처리</span><span class="WHIT">
<span class='line'>529</span> </span><span class="WHIT">				</span><span class="NAME">aImage.push</span><span class="PUNC">(</span><span class="NAME">oConfig.IMG.BLANK</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>530</span> </span><span class="WHIT">				</span><span class="NAME">nPageNum</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>531</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">%</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">			</span><span class="COMM">//한면 보기이고, 뒷면일 때에 대한 이미지 처리(동일 이미지 복사)</span><span class="WHIT">
<span class='line'>532</span> </span><span class="WHIT">				</span><span class="NAME">nPaperIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">nIdx</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>533</span> </span><span class="WHIT">				</span><span class="NAME">aImage.push</span><span class="PUNC">(</span><span class="NAME">ImageUrlGenerator</span><span class="PUNC">(</span><span class="STRN">"news"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.DPI</span><span class="PUNC">+</span><span class="STRN">"dpi"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.pressCode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.publishTime</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.publishNum</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">createImageUrl</span><span class="PUNC">(</span><span class="NAME">window.SECURE_URL</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">%</span><span class="NAME">window.SECURE_URL.length</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.aPageList</span><span class="PUNC">[</span><span class="NAME">nPaperIndex</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">skey</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>534</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>535</span> </span><span class="WHIT">				</span><span class="NAME">nPaperIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">Math.floor</span><span class="PUNC">(</span><span class="NAME">nIdx</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>536</span> </span><span class="WHIT">				</span><span class="NAME">aImage.push</span><span class="PUNC">(</span><span class="NAME">ImageUrlGenerator</span><span class="PUNC">(</span><span class="STRN">"news"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.DPI</span><span class="PUNC">+</span><span class="STRN">"dpi"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.pressCode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.date</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.publishTime</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.publishNum</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nPageNum</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">createImageUrl</span><span class="PUNC">(</span><span class="NAME">window.SECURE_URL</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">%</span><span class="NAME">window.SECURE_URL.length</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htFlipInfo.aPageList</span><span class="PUNC">[</span><span class="NAME">nPaperIndex</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">skey</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>537</span> </span><span class="WHIT">				</span><span class="NAME">nPageNum</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>538</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>539</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>540</span> 
<span class='line'>541</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aImage</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>542</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>543</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>544</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>545</span> 	 * 요청하는 페이지의 구매 여부를 체크하여 노출 가능한 페이지인지 여부를 리턴한다.
<span class='line'>546</span> 	 * @param {HashTable} htData 		서버로부터 받은 신문 데이터 
<span class='line'>547</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>548</span> 	 * @param {Number} nCurPage 		현재 페이지 번호
<span class='line'>549</span> 	 * @return {Boolean} 노출 가능 여부
<span class='line'>550</span> 	 */</span><span class="WHIT">
<span class='line'>551</span> </span><span class="WHIT">	</span><span class="NAME">isAvailablePage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htData</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">nCurPage</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>552</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPageList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htData.pages.page</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdxCurPage</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">			</span><span class="NAME">nIdxCurPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>556</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htCurPageInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageList</span><span class="PUNC">[</span><span class="NAME">nIdxCurPage</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>557</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">htCurPageInfo.purchaseYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htCurPageInfo.freeYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//구매 or 무료일 경우</span><span class="WHIT">
<span class='line'>558</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>559</span> </span><span class="WHIT">			</span><span class="NAME">nIdxCurPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>560</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htLCurPageInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageList</span><span class="PUNC">[</span><span class="NAME">nIdxCurPage</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>561</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htRCurPageInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPageList</span><span class="PUNC">[</span><span class="NAME">nIdxCurPage</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>562</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nCurPage</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">htLCurPageInfo.purchaseYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htLCurPageInfo.freeYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nCurPage</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">htData.totPageCnt</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htRCurPageInfo.purchaseYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htRCurPageInfo.freeYn</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"Y"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//구매 or 무료일 경우</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>564</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>565</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>566</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>567</span> 	 * 다음 페이지가 존재하는지 체크한다.
<span class='line'>568</span> 	 * @param {Number} nViewCnt 	한/양면보기 지정
<span class='line'>569</span> 	 * @param {Number} nTotalPage 	해당 신문호의 전체 페이지 갯수
<span class='line'>570</span> 	 * @param {Number} nCurPageNo 	현재 페이지 번호
<span class='line'>571</span> 	 * @return {Boolean} 다음 페이지 존재 여부
<span class='line'>572</span> 	 */</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT">	</span><span class="NAME">isNextPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewCnt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nTotalPage</span><span class="PUNC">,</span><span class="NAME">nCurPageNo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nNextPageNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.calcNextPageNum</span><span class="PUNC">(</span><span class="NAME">nCurPageNo</span><span class="PUNC">,</span><span class="NAME">nViewCnt</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>575</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nNextPageNum</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NAME">nTotalPage</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>576</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>577</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>578</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>579</span> 	 * 이전 페이지가 존재하는지 체크한다.
<span class='line'>580</span> 	 * @param {Number} nViewCnt 	한/양면보기 지정
<span class='line'>581</span> 	 * @param {Number} nCurPageNo 	현재 페이지 번호
<span class='line'>582</span> 	 * @return {Boolean} 이전 페이지 존재 여부
<span class='line'>583</span> 	 */</span><span class="WHIT">
<span class='line'>584</span> </span><span class="WHIT">	</span><span class="NAME">isPrevPage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nViewCnt</span><span class="PUNC">,</span><span class="NAME">nCurPageNo</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>585</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nPrePageNum</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.calcPrePageNum</span><span class="PUNC">(</span><span class="NAME">nCurPageNo</span><span class="PUNC">,</span><span class="NAME">nViewCnt</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>586</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPrePageNum</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>587</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>588</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>589</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>590</span> 	 * 배율 배열에서 해당 배율의 nStep만큼의 다음 배율을 찾아 리턴한다.
<span class='line'>591</span> 	 * @param {Array} aPercentList 	배율 배열
<span class='line'>592</span> 	 * @param {Number} nStep  이동할 배율 step
<span class='line'>593</span> 	 * @param {Number} nDPI   이동할 기준 배율
<span class='line'>594</span> 	 * @return {Number} 배율
<span class='line'>595</span> 	 */</span><span class="WHIT">
<span class='line'>596</span> </span><span class="WHIT">	</span><span class="NAME">calcNextDPI</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPercentList</span><span class="PUNC">,</span><span class="NAME">nStep</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>597</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nCurIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="NAME">aPercentList</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>598</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPercentList.length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>599</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>600</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nCurIdx</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>601</span> </span><span class="WHIT">			</span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPercentList.concat</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>602</span> </span><span class="WHIT">			</span><span class="NAME">aTemp.sort</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>603</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>604</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT">			</span><span class="NAME">nCurIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="NAME">aTemp</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>606</span> </span><span class="WHIT">			</span><span class="NAME">aPercentList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aTemp</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>607</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>608</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nNewIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nCurIdx</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">nStep</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nMinIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>610</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nNewIdx</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"MIN"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>613</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nNewIdx</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">nLen</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>614</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"MAX"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">    </span><span class="WHIT">
<span class='line'>616</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aPercentList</span><span class="PUNC">[</span><span class="NAME">nNewIdx</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>619</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>620</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>621</span> 	 * 페이지 넘기기 애니메이션이 가능한 DPI인지 체크한다.
<span class='line'>622</span> 	 * @param {Number} nDPI 	현재 DPI
<span class='line'>623</span> 	 * @return {Boolean} 페이지 넘기기 애니메이션 가능 배율인지 여부
<span class='line'>624</span> 	 */</span><span class="WHIT">
<span class='line'>625</span> </span><span class="WHIT">	</span><span class="NAME">isAbleFlipAnimation</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>626</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="NAME">oConfig.ZOOM_INFO.pageFlipAnimation</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">has</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>628</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>629</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>630</span> 	 * makePageBtnTitle 이전/다음 페이지 버튼에 노출되는 title 문구 정의하는 함수
<span class='line'>631</span> 	 * @param {Number} nPageNum 		현재 페이지 번호
<span class='line'>632</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>633</span> 	 * @param {Number} nTotalPageCnt 전체 페이지 갯수
<span class='line'>634</span> 	 * @param {String} sForward 페이지 버튼 방향 (pre|next)
<span class='line'>635</span> 	 * @return {String} 페이지이동버튼에 사용될 title 값
<span class='line'>636</span> 	 */</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT">	</span><span class="NAME">makePageBtnTitle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">,</span><span class="NAME">nViewType</span><span class="PUNC">,</span><span class="NAME">nTotalPageCnt</span><span class="PUNC">,</span><span class="NAME">sForward</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bPrePage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sForward</span><span class="PUNC">==</span><span class="STRN">"pre"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>639</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sPrePageNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>640</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sNextPageNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>641</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">nViewType</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>642</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">bPrePage</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>643</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">-</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">-</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">","</span><span class="PUNC">+</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"면"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>644</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>645</span> </span><span class="WHIT">				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nTotalPageCnt</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">","</span><span class="PUNC">+</span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">"면"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>646</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>647</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>648</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bPrePage</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nPageNum</span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="STRN">"면"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>649</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>650</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>651</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>652</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>653</span> 	 * 현재 페이지의 ID를 가져오는 함수
<span class='line'>654</span> 	 * @param {Array} aPageInfo  페이지 정보를 담고 있는 배열
<span class='line'>655</span> 	 * @param {Number} nViewType 	한/양면보기 지정
<span class='line'>656</span> 	 * @param {Number} nTotalPageCnt 전체 페이지 갯수
<span class='line'>657</span> 	 * @return {String} 아이디 
<span class='line'>658</span> 	 */</span><span class="WHIT">
<span class='line'>659</span> </span><span class="WHIT">	</span><span class="NAME">getCurPageId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPageInfo</span><span class="PUNC">,</span><span class="NAME">nViewCnt</span><span class="PUNC">,</span><span class="NAME">nCurPage</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>660</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdxCurPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.calcCurPageIdx</span><span class="PUNC">(</span><span class="NAME">nViewCnt</span><span class="PUNC">,</span><span class="NAME">nCurPage</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>661</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aPageInfo</span><span class="PUNC">[</span><span class="NAME">nIdxCurPage</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">pageId</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>662</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>663</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>665</span> 	 * 첫번째 전달인자에서 현재 페이지의 보안키를 추출하여 배열로 반환한다.
<span class='line'>666</span> 	 * @param {Array} aPageInfo 페이지 정보를 담고 있는 배열
<span class='line'>667</span> 	 * @param {Number} nViewPageCnt 한/양면보기 지정
<span class='line'>668</span> 	 * @return {Array} 현재 보고있는 페이지의 보안키
<span class='line'>669</span> 	 */</span><span class="WHIT">
<span class='line'>670</span> </span><span class="WHIT">	</span><span class="NAME">getSecureKey</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPaperInfo</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nViewPageCnt</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>671</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aSecureKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>672</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">&lt;</span><span class="NAME">nViewPageCnt</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>673</span> </span><span class="WHIT">			</span><span class="NAME">aSecureKey.push</span><span class="PUNC">(</span><span class="NAME">aPaperInfo</span><span class="PUNC">[</span><span class="NAME">nViewPageCnt</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">skey</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>674</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>675</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>676</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aSecureKey</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>678</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>679</span> 
<span class='line'>680</span> </span><span class="NAME">nhn.newsstand.viewer.paper.Model.MSG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT">	</span><span class="NAME">CONTEXTMENU</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>682</span> </span><span class="WHIT">		</span><span class="NAME">REPORTTP</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">			</span><span class="COMM">//보도종류</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT">			</span><span class="NAME">CORRECT</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"정정"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>684</span> </span><span class="WHIT">			</span><span class="NAME">ARGUMENT</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"반론"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">			</span><span class="NAME">FURTHER</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"추후"</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>687</span> </span><span class="WHIT">		</span><span class="NAME">ORIGINALFOLLOWTP</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">	</span><span class="COMM">//기사대상</span><span class="WHIT">
<span class='line'>688</span> </span><span class="WHIT">			</span><span class="NAME">ORIGINAL</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"원문기사"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>689</span> </span><span class="WHIT">			</span><span class="NAME">FOLLOWUP</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"후속기사"</span><span class="WHIT">
<span class='line'>690</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>691</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>692</span> </span><span class="WHIT">		</span><span class="NAME">ARTICLESTATUS</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT">			</span><span class="NAME">REVIEW</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"이 기사는 언론중재위원회 &lt;span>심리 중인 기사입니다.&lt;/span>"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT">			</span><span class="NAME">REQUEST</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"이 기사는 {=REPORTTP} 보도 요청 중입니다."</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">			</span><span class="NAME">JUDGMENT</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"이 기사에는 언론중재위원회의 중재 결정에 &lt;span>따른 {=REPORTTP} 보도문{=MSG_ENDING}&lt;strong>&lt;a target=\"_blank\" href=\"{=URL}\">{=MSG_ARTICLE_VIEW}&lt;/a>&lt;/strong>&lt;/span>"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT">			</span><span class="NAME">INPUTCONTENT</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"{=INPUTCONTENT}&lt;span>&nbsp;&lt;strong>&lt;a target=\"_blank\" href=\"{=URL}\">{=MSG_ARTICLE_VIEW}&lt;/a>&lt;/strong>&lt;/span>"</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>697</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>698</span> </span><span class="WHIT">		</span><span class="NAME">BLINDAREA</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"이 기사는 언론사 요청에 의해&lt;span>일부 내용이 블라인드되었습니다.&lt;/span>"</span><span class="WHIT">
<span class='line'>699</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>700</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>